import {adminUrl} from "@/utils/baseUrl.js"
import request from '@/utils/request'

// 创建楼层
export function createAccommodationFloor(data) {
  return request({
    url: adminUrl + '/collegebase/accommodation-floor/create',
    method: 'post',
    data: data
  })
}

// 更新楼层
export function updateAccommodationFloor(data) {
  return request({
    url: adminUrl + '/collegebase/accommodation-floor/update',
    method: 'put',
    data: data
  })
}

// 删除楼层
export function deleteAccommodationFloor(id) {
  return request({
    url: adminUrl + '/collegebase/accommodation-floor/delete?id=' + id,
    method: 'delete'
  })
}

// 获得楼层
export function getAccommodationFloor(id) {
  return request({
    url: adminUrl + '/collegebase/accommodation-floor/get?id=' + id,
    method: 'get'
  })
}

// 获得楼层分页
export function getAccommodationFloorPage(query) {
  return request({
    url: adminUrl + '/collegebase/accommodation-floor/page',
    method: 'get',
    params: query
  })
}

// 导出楼层 Excel
export function exportAccommodationFloorExcel(query) {
  return request({
    url: adminUrl + '/collegebase/accommodation-floor/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
